package com.mfnote.view.setting;

import com.mfnote.view.R;
import com.mfnote.view.R.id;
import com.mfnote.view.R.layout;
import com.mfnote.view.main.MainActivity;
import com.mfnote.view.other.MyApplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;


public class AboutActivity extends Activity implements OnClickListener {
	private ImageButton about_back = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.about_software);
		MyApplication.getInstance().addActivity(this);
		
		about_back = (ImageButton) findViewById(R.id.about_back);
		about_back.setOnClickListener(this);
	
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if(keyCode==KeyEvent.KEYCODE_BACK){
			//跳回设置界面
			Intent intent = new Intent(this,SettingActivity.class);
			startActivity(intent);
			finish();
			overridePendingTransition(R.anim.push_left_in,
					R.anim.push_right_out);
		}
		
		return true;
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.about_back:
			Intent intent = new Intent(this,SettingActivity.class);
			startActivity(intent);
			finish();
			overridePendingTransition(R.anim.push_left_in,
					R.anim.push_right_out);
			break;

		}
	}

	
}
